/**
 * Created by lwy on 2017/7/5.
 */

//获取是否有未读消息
$(function(){
    $.ajax({
        url:'/messagesC/countNotReadMessages.json',
        dataType:'json',
        data:{
            token:getItem('token'),
        },
        type:'post',
        success:function(data){
            if(data.code==1){
                var data = data.datas;
                if(data.count==0){
                    $('#red').hide();
                }else{
                    $('#red').show();
                }
            }
            if(data.code==-1){
                window.location.href="login.html"
            }
        }
    })
})
